import { ref } from 'vue'
import { defineStore } from 'pinia'
import type { PreOrderAddressItem } from '@/types/order'

export const useAddress = defineStore('address', () => {
  const selectedAddress = ref<PreOrderAddressItem>()
  const changeSelectedAddress = (val: PreOrderAddressItem) => {
    selectedAddress.value = val
  }
  return {
    selectedAddress,
    changeSelectedAddress,
  }
})
